{extends file="./link.tpl"}
{block name=head}
<script src="js/jquery.min.js" ></script>
{/block}
{block name=body}
<br/>
<br/>
<br/>
<br/>
<center>
	<form name="drawForm"action="drawWinner.php" method="post">
    <table border="1"  cellpadding="5" cellspacing="0">
      <tr>
        <td><input type="hidden" name="drawId" value="{$nextDrawArray.drawId}">{$nextDrawArray.drawId}</td>
        <td>
          Card No :<input type="text" name="cardNo" id="cardNo">
        </td>
        <td>{$nextDrawArray.drawDate}</td>
        <td>{$nextDrawArray.prize}</td>
      </tr>
      <tr>
         <td colspan="4" align="center"><input type="submit" name="subBtn" id="subBtn"></td>
      </tr>
    </table>
    <br><br><br>
    
    <h1>Winner List</h1><br>
    <table cellspacing="0" cellpadding="5"  border="1">
      <tr>
        <th>No </th>
        <th>Draw Date</th>
        <th>Prize</th>
        <th>Main Winner</th>
        <th>Sub Winner1</th>
        <th>Sub Winner2</th>
        <th>Sub Winner3</th>
        <th>Sub Winner4</th>
      </tr>
      {section name=sec loop=$winnerArray}
      <tr>
        <td>{$winnerArray[sec].drawId}</td>
        <td>{$winnerArray[sec].drawDate|date_format:'%d-%m-%Y'}</td>
        <td>{$winnerArray[sec].prize}</td>
        <td align="center" {if $winnerArray[sec].winnerLoanDrawIdStatus} style="color:red;"{/if}>{$winnerArray[sec].winnerLoanDrawId}</td>
        <td align="center" {if $winnerArray[sec].winnerLoanDrawId1Status} style="color:red;"{/if}>{$winnerArray[sec].winnerLoanDrawId1}</td>
        <td align="center" {if $winnerArray[sec].winnerLoanDrawId2Status} style="color:red;"{/if}>{$winnerArray[sec].winnerLoanDrawId2}</td>
        <td align="center" {if $winnerArray[sec].winnerLoanDrawId3Status} style="color:red;"{/if}>{$winnerArray[sec].winnerLoanDrawId3}</td>
        <td align="center" {if $winnerArray[sec].winnerLoanDrawId4Status} style="color:red;"{/if}>{$winnerArray[sec].winnerLoanDrawId4}</td>
      </tr>
      {/section}
    </table>
  </form>
</center>
{/block}